$(document).ready(function() {
	var chart;

	if( $("#storepoint-charts-pb").length ){
		/* STORY POINTS PRODUCT BAKLOG */
		chart = new Highcharts.Chart({
			chart: {renderTo: 'storepoint-charts-pb', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false },
			title: {text: ''},
			tooltip: {formatter: function() {return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %'; } }, 
			plotOptions: {pie: {allowPointSelect: true, cursor: 'pointer', dataLabels: {enabled: false }, showInLegend: true } }, series: [{
				type: 'pie',
				name: 'Dashboard Product Backlog',
				data: [
                    ['Não Iniciado', parseFloat(pNaoIniciado)],
					['Em Andamento', parseFloat(pIniciado)],
					['Concluído', parseFloat(pFinalizado)],
					{
						name: 'Impedimento',
						y: parseFloat(pImpedido),
						sliced: true,
						selected: true
					}
				]
			}]
		});
	}else{}

	if($("#storepoint-charts-s").length){
		/* STORY POINTS SPRINT */
		chart = new Highcharts.Chart({
			chart: {renderTo: 'storepoint-charts-s', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false },
			title: {text: ''},
			tooltip: {formatter: function() {return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %'; } }, 
			plotOptions: {pie: {allowPointSelect: true, cursor: 'pointer', dataLabels: {enabled: false }, showInLegend: true } }, series: [{
				type: 'pie',
				name: 'Dashboard Sprint',
				data: [
                  ['Não Iniciado', parseFloat(sNaoIniciado)],
					['Em Andamento',parseFloat( sIniciado)],
					['Concluído',parseFloat( sImpedido)],
					{
						name: 'Impedimento',
						y: parseFloat(sFinalizado),
						sliced: true,
						selected: true
					}
				]
			}]
		});
	}else{}


	if( $("#informacoes-sprint01").length ){
		/* INFORMACOES SPRINT */
		chart = new Highcharts.Chart({
			chart: {renderTo: 'informacoes-sprint01', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false },
			title: {text: 'Sprint'},
			tooltip: {formatter: function() {return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %'; } }, 
			plotOptions: {pie: {allowPointSelect: true, cursor: 'pointer', dataLabels: {enabled: false }, showInLegend: true } }, series: [{
				type: 'pie',
				name: 'Dashboard Sprint Informacoes',
				data: [
                  ['Não Iniciado', 25.0],
					['Em Andamento', 10.0],
					['Concluído',   80.0],
					{
						name: 'Impedimento',
						y: 10.0,
						sliced: true,
						selected: true
					}
				]
			}]
		});
	}else{}

	if( $("#informacoes-sprint02").length ){
		/* INFORMACOES SPRINT */
		chart = new Highcharts.Chart({
			chart: {renderTo: 'informacoes-sprint02', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false },
			title: {text: 'Sprint'},
			tooltip: {formatter: function() {return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %'; } }, 
			plotOptions: {pie: {allowPointSelect: true, cursor: 'pointer', dataLabels: {enabled: false }, showInLegend: true } }, series: [{
				type: 'pie',
				name: 'Dashboard Sprint Informacoes',
				data: [
                   ['Não Iniciado', 25.0],
					['Em Andamento', 84.0],
					['Concluído',   10.0],
					{
						name: 'Impedimento',
						y: 6.0,
						sliced: true,
						selected: true
					}
				]
			}]
		});
	}else{}

});

